package io.ooad.jenkins.shuren;

import com.fasterxml.jackson.databind.JsonNode;
import retrofit2.Response;

import java.io.IOException;

/**
 * Created by yyang on 2017/1/3.
 */
public class LogoutCommand extends BaseCommand {

    public LogoutCommand(ShurenyunService service) {
        super(service);
    }

    @Override
    public Response<JsonNode> execute() {
        try {
            return getService().logout().execute();
        } catch (IOException e) {
            throw new RuntimeException("注销失败");
        }
    }
}
